package com.neusoft.nepg.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.neusoft.common.domain.Grider;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Result;
import org.apache.ibatis.annotations.Results;
import org.apache.ibatis.annotations.Select;

import java.util.List;

public interface GriderMapper extends BaseMapper<Grider> {
    @Select("select * from grider where province = #{id} and city = #{cid}")
    @Results({
            @Result(column = "admin_code",property = "admin_code")
    })
    List<Grider> areaList(@Param("id") int id,@Param("cid") int cid);
    @Select("select * from grider where admin_code = #{code}")
    @Results({
            @Result(column = "admin_code",property = "admin_code")
    })
    List<Grider> findGrider(String code);

}
